<#import "/spring.ftl" as spring />
<#import "/inspector-time-macros.ftl" as imacro />

<html>
<head>
	<title>Inspector</title>
</head>
<body>
<div id="content">

	<h1>INSPECTOR PROFILE</h1>
	
	<p>Please edit any of the fields below and click "SAVE".</p>
	
	<@imacro.listErrors "inspector" />
	
	<form action="editInspectorProfile.html" method="post">
		<@spring.formHiddenInput "inspector.id" />
		
		<#-- we're specifically marking the table-layout as fixed here to get around an IE6 issue 
			 where the two-colspan row isn't respecting the width that is defined for the table headers -->
		<table class="formTable twoColForm" style="table-layout: fixed;">
			<tr>
				<th><span class="required">*</span>First Name</th>
				<td><@spring.formInput "inspector.name.first", 'size="25", maxlength="50"'/></td>
			</tr>
			<tr>
				<th><span class="required">*</span>Last Name</th>
				<td><@spring.formInput "inspector.name.last", 'size="25", maxlength="50"'/></td>
			</tr>
			<tr>
				<th><span class="required">*</span>Email Address</th>
				<td><@spring.formInput "inspector.email", 'size="25", maxlength="100"'/></td>
			</tr>
			<tr>
				<th><span class="required">*</span>Confirm Email Address</th>
				<td><@spring.formInput "inspector.emailConfirm", 'size="25", maxlength="100"'/></td>
			</tr>
			<tr>
				<th><span class="required">*</span>Username</th>
				<td><@spring.formInput "inspector.userName", 'size="10", maxlength="50"'/></td>
			</tr>
			<tr>
				<th>New Password</th>
				<td><@spring.formPasswordInput "inspector.password", 'size="15", maxlength="28"'/></td>
			</tr>
			<tr>
				<th>Phone</th>
				<td><@spring.formInput "inspector.phone", 'size="15", maxlength="20"'/></td>
			</tr>
			<tr>
				<td colspan="2">
					<input type="checkbox" <#if inspector.limitDrivingPerDay>checked="checked" </#if> name="limitDrivingPerDay" class="checkbox">		
					Limit driving distance between appointments on the same day to <@spring.formInput "inspector.limitDrivingPerDayDistance", 'size="3", maxlength="2"'/> miles.</p> 
				</td>
			</tr>
			<tr>
				<td colspan="2" class="buttons">
					<input type="submit" value="SAVE" class="formButton" />
					<a href="deleteInspectorProfile.html?id=${inspector.id}" class="formLink">-REMOVE-</a>
					<a href="settings.html" class="formLink">-CANCEL-</a>
				</td>
			</tr>
		</table>
		
		
		
		<#--
		<div class="formElement"><label>FIRST NAME<span class="required">*</span></label><@spring.formInput "inspector.name.first", 'size="30", maxlength="50"'/></div>
		<div class="formElement"><label>LAST NAME<span class="required">*</span></label><@spring.formInput "inspector.name.last", 'size="30", maxlength="50"'/></div>
		<div class="formElemRow"></div>
		<div class="formElement"><label>EMAIL ADDRESS<span class="required">*</span></label><@spring.formInput "inspector.email", 'size="30", maxlength="100"'/></div>
		<div class="formElement"><label>CONFIRM EMAIL ADDRESS<span class="required">*</span></label><@spring.formInput "inspector.emailConfirm", 'size="30", maxlength="100"'/></div>
		<div class="formElemRow"></div>
		<div class="formElement"><label>USERNAME<span class="required">*</span></label><@spring.formInput "inspector.userName", 'size="30", maxlength="50"'/></div>
		<div class="formElement"><label>NEW PASSWORD</label><@spring.formPasswordInput "inspector.password", 'size="30", maxlength="28"'/></div>
		<div class="formElemRow"></div>
		<div class="formElement"><label>PHONE</label><@spring.formInput "inspector.phone", 'size="30", maxlength="20"'/></div>
		<div class="formElemRow"></div>
		<br style="clear:both" />

		<p><input type="checkbox" 
			<#if inspector.limitDrivingPerDay>
				checked="checked" 
			</#if>			
			name="limitDrivingPerDay">		
		Limit driving distance between appointments on the same day to <@spring.formInput "inspector.limitDrivingPerDayDistance", 'size="3", maxlength="2"'/> miles.</p> 
		
		<input type="submit" value="SAVE" class="formButton" />
		<a href="deleteInspectorProfile.html?id=${inspector.id}" class="formLink">-REMOVE-</a>
		<a href="settings.html" class="formLink">-CANCEL-</a>
		-->
		
		
		<div class="requiredText">*INDICATES REQUIRED FIELDS</div>
		
	</form>
</div>
</body>
</html>
